3.26 \(\int \csc ^4(e+f x) (a+b \sec ^2(e+f x))^2 \, dx\)

Optimal. Leaf size=76 \[ \frac {b (2 a+3 b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot ^3(e+f x)}{3 f}-\frac {(a+b) (a+3 b) \cot (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]

[Out]

-(a+b)*(a+3*b)*cot(f*x+e)/f-1/3*(a+b)^2*cot(f*x+e)^3/f+b*(2*a+3*b)*tan(f*x+e)/f+1/3*b^2*tan(f*x+e)^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {4132, 448} \[ \frac {b (2 a+3 b) \tan (e+f x)}{f}-\frac {(a+b)^2 \cot ^3(e+f x)}{3 f}-\frac {(a+b) (a+3 b) \cot (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Csc[e + f*x]^4*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-(((a + b)*(a + 3*b)*Cot[e + f*x])/f) - ((a + b)^2*Cot[e + f*x]^3)/(3*f) + (b*(2*a + 3*b)*Tan[e + f*x])/f + (b
^2*Tan[e + f*x]^3)/(3*f)

Rule 448

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Int[ExpandI
ntegrand[(e*x)^m*(a + b*x^n)^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && NeQ[b*c - a*d, 0] &
& IGtQ[p, 0] && IGtQ[q, 0]

Rule 4132

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_), x_Symbol] :> With[{ff = Fr
eeFactors[Tan[e + f*x], x]}, Dist[ff^(m + 1)/f, Subst[Int[(x^m*ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p)/(
1 + ff^2*x^2)^(m/2 + 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && Integer
Q[n/2]

Rubi steps

\begin {align*} \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (1+x^2\right ) \left (a+b+b x^2\right )^2}{x^4} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left (b (2 a+3 b)+\frac {(a+b)^2}{x^4}+\frac {(a+b) (a+3 b)}{x^2}+b^2 x^2\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {(a+b) (a+3 b) \cot (e+f x)}{f}-\frac {(a+b)^2 \cot ^3(e+f x)}{3 f}+\frac {b (2 a+3 b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.36, size = 151, normalized size = 1.99 \[ -\frac {\csc (2 e) \csc ^3(2 (e+f x)) \left (-3 a^2 \sin (2 (e+f x))+a^2 \sin (6 (e+f x))+3 a^2 \sin (4 e+2 f x)+a^2 \sin (4 e+6 f x)-6 a b \sin (2 (e+f x))+2 a b \sin (6 (e+f x))+8 a b \sin (4 e+6 f x)+8 a (a+2 b) \sin (2 e)-6 (a+2 b)^2 \sin (2 f x)+8 b^2 \sin (4 e+6 f x)\right )}{6 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[e + f*x]^4*(a + b*Sec[e + f*x]^2)^2,x]

[Out]

-1/6*(Csc[2*e]*Csc[2*(e + f*x)]^3*(8*a*(a + 2*b)*Sin[2*e] - 6*(a + 2*b)^2*Sin[2*f*x] - 3*a^2*Sin[2*(e + f*x)]
- 6*a*b*Sin[2*(e + f*x)] + a^2*Sin[6*(e + f*x)] + 2*a*b*Sin[6*(e + f*x)] + 3*a^2*Sin[4*e + 2*f*x] + a^2*Sin[4*
e + 6*f*x] + 8*a*b*Sin[4*e + 6*f*x] + 8*b^2*Sin[4*e + 6*f*x]))/f

________________________________________________________________________________________

fricas [A]  time = 0.71, size = 101, normalized size = 1.33 \[ -\frac {2 \, {\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \, {\left (a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, {\left (f \cos \left (f x + e\right )^{5} - f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

-1/3*(2*(a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^6 - 3*(a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 + 6*(a*b + b^2)*cos(f*x
+ e)^2 + b^2)/((f*cos(f*x + e)^5 - f*cos(f*x + e)^3)*sin(f*x + e))

________________________________________________________________________________________

giac [A]  time = 0.80, size = 105, normalized size = 1.38 \[ \frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 9 \, b^{2} \tan \left (f x + e\right ) - \frac {3 \, a^{2} \tan \left (f x + e\right )^{2} + 12 \, a b \tan \left (f x + e\right )^{2} + 9 \, b^{2} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

1/3*(b^2*tan(f*x + e)^3 + 6*a*b*tan(f*x + e) + 9*b^2*tan(f*x + e) - (3*a^2*tan(f*x + e)^2 + 12*a*b*tan(f*x + e
)^2 + 9*b^2*tan(f*x + e)^2 + a^2 + 2*a*b + b^2)/tan(f*x + e)^3)/f

________________________________________________________________________________________

maple [A]  time = 1.38, size = 144, normalized size = 1.89 \[ \frac {a^{2} \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (f x +e \right )\right )}{3}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )^{3}}-\frac {2}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {8}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {16 \cot \left (f x +e \right )}{3}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x)

[Out]

1/f*(a^2*(-2/3-1/3*csc(f*x+e)^2)*cot(f*x+e)+2*a*b*(-1/3/sin(f*x+e)^3/cos(f*x+e)+4/3/sin(f*x+e)/cos(f*x+e)-8/3*
cot(f*x+e))+b^2*(1/3/sin(f*x+e)^3/cos(f*x+e)^3-2/3/sin(f*x+e)^3/cos(f*x+e)+8/3/sin(f*x+e)/cos(f*x+e)-16/3*cot(
f*x+e)))

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 80, normalized size = 1.05 \[ \frac {b^{2} \tan \left (f x + e\right )^{3} + 3 \, {\left (2 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)^4*(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

1/3*(b^2*tan(f*x + e)^3 + 3*(2*a*b + 3*b^2)*tan(f*x + e) - (3*(a^2 + 4*a*b + 3*b^2)*tan(f*x + e)^2 + a^2 + 2*a
*b + b^2)/tan(f*x + e)^3)/f

________________________________________________________________________________________

mupad [B]  time = 4.45, size = 85, normalized size = 1.12 \[ \frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {\frac {2\,a\,b}{3}+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a^2+4\,a\,b+3\,b^2\right )+\frac {a^2}{3}+\frac {b^2}{3}}{f\,{\mathrm {tan}\left (e+f\,x\right )}^3}+\frac {b\,\mathrm {tan}\left (e+f\,x\right )\,\left (2\,a+3\,b\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(e + f*x)^2)^2/sin(e + f*x)^4,x)

[Out]

(b^2*tan(e + f*x)^3)/(3*f) - ((2*a*b)/3 + tan(e + f*x)^2*(4*a*b + a^2 + 3*b^2) + a^2/3 + b^2/3)/(f*tan(e + f*x
)^3) + (b*tan(e + f*x)*(2*a + 3*b))/f

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(f*x+e)**4*(a+b*sec(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________